package com.example.hxds.bff.customer.fegin;

import cn.hutool.core.bean.BeanUtil;
import com.example.hxds.bff.customer.controller.form.*;
import com.example.hxds.common.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.checkerframework.checker.units.qual.C;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Configuration;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;

@FeignClient(value = "hxds-odr")
public interface OdrServiceApi {

    @PostMapping("/order/insertOrder")
    public R insertOrder(InsertOrderForm form);

    @PostMapping("/order/searchOrderStatus")
    public R searchOrderStatus(SearchOrderStatusForm form);


    @PostMapping("/order/deleteUnAcceptOrder")
    public R deleteUnAcceptOrder(DeleteUnAcceptOrderForm form);

    @PostMapping("/order/hasCustomerCurrentOrder")
    public R hasCustomerCurrentOrder(HasCustomerCurrentOrderForm form);

    @PostMapping("/order/searchOrderForMoveById")
    public R searchOrderForMoveById(SearchOrderForMoveByIdForm form);

    @PostMapping("/order/confirArriveStartPlace")
    public R confirArriveStartPlace(@RequestBody @Valid ConfirmArriveStartPlaceForm form);

    @PostMapping("/order/searchOrderById")
    public R searchOrderById(@RequestBody @Valid SearchOrderByIdForm form);


    @PostMapping("/order/validCanPayOrder")
    //"检查订单是否可以支付"
    public R validCanPayOrder(@RequestBody @Valid ValidCanPayOrderForm form);

    @PostMapping("/order/updateOrderPrepayId")
    //更新预支付订单ID
    public R updateOrderPrepayId(@RequestBody @Valid UpdateOrderPrepayIdForm form);

    @PostMapping("/bill/updateBillPayment")
    //更新账单实际支付费用
    public R updateBillPayment(@RequestBody @Valid UpdateBillPaymentForm form);

    //查询司机是否关联某订单
    @PostMapping("/order/updateOrderAboutPayment")
    public R updateOrderAboutPayment(@RequestBody @Valid UpdateOrderAboutPaymentForm form);

    //保存订单评价
    @PostMapping("/comment/insertComment")
    public R insertComment(InsertCommentForm form);

    //查询订单分页记录
    @PostMapping("/order/searchCustomerOrderByPage")
    public R searchCustomerOrderByPage(@RequestBody @Valid SearchCustomerOrderByPageForm form);

    @PostMapping("/comment/searchCommentByOrderId")
    public R searchCommentByOrderId(SearchCommentByOrderIdForm form);
}